package com.lf.web.service.system.config;

import com.lf.data.Cluster;
import com.lf.data.Page;
import com.lf.data.search.Field;
import com.lf.web.service.ServiceSupport;

public class ConfigService extends ServiceSupport {

    private ConfigDAO configDAO;

    public ConfigService() {
    }

    public void setConfigDAO(ConfigDAO configDAO) {
        this.configDAO = configDAO;
    }

    public String execute() {
        Page page = new Page();
        form.getBean(page);
        Field field = new Field(Config.NAME, Config.DESCRIPT, Config.CREATED);
        Cluster configs = configDAO.findPage(null, field, null, page);
        context.put("configs", configs);
        return SUCCESS;
    }
}
